#ifndef TRANSPORT_INTERFACE_HPP
#define TRANSPORT_INTERFACE_HPP
#include <string>
#include <sys/time.h>

namespace pipc
{

typedef struct
{
    std::string data;
    struct timeval effective;
} Record;

class TransportInterface
{
public:
    virtual bool start() = 0;
    virtual bool stop() = 0;
    virtual bool isRunning() = 0;
    virtual bool subscibe(std::string key, bool reader) = 0;
    virtual bool isSynced(std::string key) = 0;
    virtual bool setValue(std::string key, Record value) = 0;
    virtual Record getValue(std::string key) = 0;
    virtual void clear() = 0;
};

}
#endif // TRANSPORT_INTERFACE_HPP
